import { defineStore } from "pinia";
type MenuInfoType = {
  theme: ThemeType;
  openNames: Array<string>;
  activeName: string;
};
export default defineStore("main", {
  state() {
    // 用户信息
    const userInfo = {};
    // 用户配置
    const userConfig = {
      autoLogin: false,
    };
    // 菜单
    const menuInfo: MenuInfoType = {
      theme: "dark",
      openNames: ["1"],
      activeName: "1-1",
    };
    // 首页样式
    const navClass: string = "nav-theme-dark";
    const headerClass: string = "header-theme-light";
    return {
      userConfig,
      userInfo,
      menuInfo,
      navClass,
      headerClass,
    };
  },
  getters: {},
  actions: {},
});
